package com.ybxx.base.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.ybxx.core.model.BaseModel;

@Entity
@Table(name="tbl_base_fees")
public class Fees extends BaseModel {
	@Id
	private String fid;
	@ManyToOne(targetEntity=Community.class,fetch=FetchType.LAZY)
	@JoinColumn(name="cid",referencedColumnName="cid") 
	private Community community;
	private String content;
	@OneToMany(targetEntity=FeesItem.class,cascade={CascadeType.ALL},mappedBy="fees",fetch = FetchType.LAZY)
	private Set<FeesItem> feesItems=new HashSet<FeesItem>();
	public String getFid() {
		return fid;
	}
	public void setFid(String fid) {
		this.fid = fid;
	}
	public Community getCommunity() {
		return community;
	}
	public void setCommunity(Community community) {
		this.community = community;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Set<FeesItem> getFeesItems() {
		return feesItems;
	}
	public void setFeesItems(Set<FeesItem> feesItems) {
		this.feesItems = feesItems;
	}
	
}
